package ch3;

/**
 * Created by wyao on 17-3-6.
 * 静态方法替代实例方法
 */
public class C3_7 {
    public static void staticMethod() {

    }

    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        for (int i = 0; i < 1000000000; i++) {
            C3_7.staticMethod();
        }
        System.out.println(System.currentTimeMillis() - start);

        start = System.currentTimeMillis();
        C3_7 c3_7 = new C3_7();
        for (int i = 0; i < 1000000000; i++) {
            c3_7.instanceMethod();
        }
        System.out.println(System.currentTimeMillis() - start);
    }

    public void instanceMethod() {

    }
}
